package com.mhh.selary.backend.dto.api;

import com.mhh.sdk.beans.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import java.util.Map;

/**
 * @author mhh
 * @date 2020-10-27 11:30:00
 */
@Getter
@Setter
@ApiModel("Http接口运行入参")
public class ApiHttpRunDTO extends BaseDTO {

    @ApiModelProperty(value = "环境id")
    private Long envId;

    @ApiModelProperty(value = "接口id")
    private Long id;

    @ApiModelProperty(value = "接口协议类型")
    private Integer protocol;

    @ApiModelProperty(value = "请求方法类型")
    private Integer method;

    @ApiModelProperty(value = "接口url")
    @Length(max = 128, message = "接口url不能大于128个字符")
    private String apiUrl;

    @ApiModelProperty(value = "请求参数类型")
    private Integer dataType;

    @ApiModelProperty(value = "请求体")
    @Length(max = 1024, message = "请求体不能大于1024个字符")
    private String requestBody;

    @ApiModelProperty(value = "请求头参数")
    private Map<String, String> headMap;

    @ApiModelProperty(value = "请求参数")
    private Map<String, String> paramMap;


}
